package static04;

public class Demo {
    int i;
    static int j=17;

    public static void main(String[] args) {
        Demo d1 = new Demo();
        Demo d2 = new Demo();
        d1.i=9;
        d1.j=21;
        System.out.println(d1.i);//9
        System.out.println(d1.j);//21
        System.out.println(d2.i);//0
        System.out.println(d2.j);//21  //静态成员变量被所有对象共享,在di.j已经将21赋值给了j,所以再用d2.j的值会变为21
    }
}
